package com.test;

import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Consumer2 {

	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/spring-consumer2.xml");
		
		context.start();
		System.out.println("consumer2 start");
		
		DemoService service =  context.getBean(DemoService.class);
		List<String> listPermissions = service.listPermissions(1L);
		
		listPermissions.forEach(permission -> {
			System.out.println("consumer2消费：" + permission);
		});

	}

}
